<?php
	//年级
	function selectAllgrades(){
		$conn = mysqli_connect("localhost:3306","mebin","171110301cwb","SMS");
		$sql = 	" select " .
				" 	gradeid,gradename " .
				" from " .
				" 	grade " ;
		$result = mysqli_query($conn, $sql);
		$grades = [];
		while($grade = mysqli_fetch_assoc($result)){
			$grades[] = $grade;
		}
		mysqli_close($conn);
		return $grades;
	}
?>